package cc.ccoke.design.factory.abs;


import cc.ccoke.design.factory.entity.Animal;

/**
 * 抽象方法模式
 * @author ccoke
 */
public class Main {
    public static void main(String[] args) {
        AnimalFactory largeAnimalFactory = new LargeAnimalFactory();
        largeAnimalFactory.getCat().age();
        largeAnimalFactory.getDog().age();

        AnimalFactory littleAnimalFactory = new LittleAnimalFactory();
        littleAnimalFactory.getCat().age();
        littleAnimalFactory.getDog().age();

    }
}
